#define _CRT_SECURE_NO_WARNINGS 1 

#include <iostream>
using namespace std;

class Solution
{
public:
    int getSum(int a, int b)
    {
        while (b != 0)
        {
            int x = a ^ b;
            unsigned int carry = (unsigned int)(a & b) << 1;
            a = x;
            b = carry;
        }
        return a;
    }
};

int main()
{
    Solution sol;
    int ret  = sol.getSum(66, 666);
    cout << ret << endl;
    return 0;
}